--
-- LOVE2D ANIMATION
--

--
-- This file will be loaded through love.filesystem.load
-- This file describes the different states and frames of the animation
--

--[[
	Each sprite sheet contains one or multiple states
	Each states is represented as a line in the image file
	The following object describes the different states
	Switching between different states can be done through code
	members ->
		imageSrc : path to the image (png, tga, bmp or jpg)
		defaultState : the first state
		states : a table containing each state
	(State)
	Each state contains the following members ->
		frameCount : the number of frames in the state
		offsetX : starting from the left, the position (in px) of the first frame of the state (aka on the line)
		offsetY : starting from the top, the position of the line (px)
		framwW : the width of each frame in the state
		frameH : the height of each frame in the state
		nextState : the state which will follow after the last frame is reached
		switchDelay : the time between each frame (seconds as floating point)
]]

-- the return statement is mandatory
return {
	imageSrc = "art/plunger.png",
	defaultState = "inactiveright",
	states = {
		inactiveright = { -- the name of the state is arbitrary
			frameCount = 4,
			offsetX = 0,
			offsetY = 0,
			frameW = 16,
			frameH = 16,
			nextState = "inactiveright", -- we loop the running state
			switchDelay = 0.1
		},
		-- 1st line
		inactiveleft = { -- the name of the state is arbitrary
			frameCount = 4,
			offsetX = 0,
			offsetY = 0,
			frameW = 16,
			frameH = 16,
			nextState = "inactiveleft", -- we loop the running state
			switchDelay = 0.1
		},
		ripright = { -- the name of the state is arbitrary
			frameCount = 4,
			offsetX = 0,
			offsetY = 16,
			frameW = 16,
			frameH = 16,
			switchDelay = 0.5
		},
		ripleft = { -- the name of the state is arbitrary
			frameCount = 4,
			offsetX = 0,
			offsetY = 16,
			frameW = 16,
			frameH = 16,
			switchDelay = 0.5
		}
	}
}
